package test;

import dao.BillDao;
import dao.CardDao;
import dao.ManagerDao;
import dao.StudentDao;
import pojo.Bill;
import pojo.Card;
import pojo.Manager;
import pojo.Student;

import java.util.List;

/**
 * @author konley
 * @date 2020-06-09 13:38
 */
public class test {
    public static void main(String[] args) {

        //开卡：，1创建学生 2创建饭卡(带余额）3开账单 ，注意处理sql.Date
        //需要的变量：学生的所有信息、首充金额
        int money = 100;
        boolean b = new StudentDao().studentAdd(10004,"小李","123456","男","信息学院","13123456789");
        boolean c = new CardDao().cardAdd(10004,money);
        int cid = new CardDao().getCid(10004);
        boolean e = new BillDao().billAdd(cid,money);
        System.out.println(b+","+c+","+e);

        //充值：1.更新余额 2.开账单
        //需要的变量：卡号cid、充值金额money
        boolean d = new CardDao().cardUpdate(cid,money);
        boolean f = new BillDao().billAdd(cid,money);
    }
}
